Image segmentation using text embedding

ABSTRACT

A non-transitory computer-readable medium includes program code that is stored thereon. The program code is executable by one or more processing devices for performing operations including generating, by a model that includes trainable components, a learned image representation of a target image. The operations further include generating, by a text embedding model, a text embedding of a text query. The text embedding and the learned image representation of the target image are in a same embedding space. Additionally, the operations include generating a class activation map of the target image by, at least, convolving the learned image representation of the target image with the text embedding of the text query. Moreover, the operations include generating an object-segmented image using the class activation map of the target image.

TECHNICAL FIELD

This disclosure relates generally to computer-implemented methods and systems for image processing. More specifically, but not by way of limitation, this disclosure involves generating object-segmented images using text embeddings of text queries.

BACKGROUND

Image segmentation is the process of identifying segments of an image. For example, image segmentation can include identifying specific objects within an image. For example, an image segmentation process involves using a machine-learning model to analyze an image depicting an animal and output an object class, such as “dog” or “cat.”

Existing segmentation techniques are often limited in scope with respect to objects within an image that are available for segmentation. For instance, some approaches limit identification of objects within the image to a specific object class. These image segmentation techniques often rely on using a fixed set of annotated classes to predict a segmentation focus in an image. For instance, the fixed set of annotated classes can be limited to objects within particular classes, such as only predicting various types of food or various types of animals. Other approaches have used image saliency as a signal to extract a most important object within the image and refine the segmentation. For instance, an image saliency model generates an indication of a most important feature of the image, and the segmentation technique predicts a class of the most important feature.

The limitations in segmentation scope used by existing image segmentation techniques can decrease the quality of the image segmentation. For instance, limiting the segmentation scope could cause the segmentation technique to ignore certain details within the image or cause segmentation technique to segment the details into improper classes. Thus, these segmentation techniques result in misidentification of objects within images, failure to identify important objects in images, or both.

SUMMARY

Certain embodiments involve image segmentation operations. In one example, a non-transitory computer-readable medium includes program code that is stored thereon. The program code is executable by one or more processing devices for performing operations including generating, by a model that includes trainable components, a learned image representation of a target image. The operations further include generating, by a text embedding model, a text embedding of a text query, where the text embedding and the learned image representation of the target image are in a same embedding space. Additionally, the operations include generating a class activation map of the target image by, at least, convolving the learned image representation of the target image with the text embedding of the text query. Moreover, the operations include generating an object-segmented image using the class activation map of the target image.

These illustrative embodiments are mentioned not to limit or define the disclosure, but to provide examples to aid understanding thereof. Additional embodiments are discussed in the Detailed Description, and further description is provided there.

BRIEF DESCRIPTION OF THE DRAWINGS

Features, embodiments, and advantages of the present disclosure are better understood when the following Detailed Description is read with reference to the accompanying drawings.

FIG. 1 depicts an example of a computing environment for performing an image-segmentation operation on a target image, according to certain embodiments of the present disclosure.

FIG. 2 depicts an example of the image-segmentation operation of FIG. 1, according to certain embodiments of the present disclosure.

FIG. 3 depicts an example of a process for performing the image-segmentation operation on the target image of FIG. 1, according to certain embodiments of the present disclosure.

FIG. 4 depicts an example of a class activation mapping system of an image-segmentation operation, according to certain embodiments of the present disclosure.

FIG. 5 depicts examples of a target image and resulting object-segmented images using the image-segmentation operation of FIG. 1, according to certain embodiments of the present disclosure.

FIG. 6 depicts examples of a target image and resulting object-segmented images using a language-neutral image-segmentation operation, according to certain embodiments of the present disclosure.

FIG. 7 depicts an example of a computing system that executes an image manipulation application for performing certain embodiments of the present disclosure.

DETAILED DESCRIPTION

Certain embodiments involve image segmentation of a target image using a text query. As discussed above, existing image segmentation methods are prone to generating unsatisfactory results. This may hold especially true when objects within the target image fall outside of narrow ranges of classes available for the image segmentation methods. Certain embodiments described herein address these limitations by, for example, employing a learned image model and a text embedding model in a segmentation operation. The learned image model and the text embedding model generate representations of the target image and the text query in a common embedding space. A segmentation process uses the learned image representation and the text embedding in the common embedding space to generate an object-segmented image that is not constrained by the limited classes available in conventional segmentation techniques.

The following non-limiting example is provided to introduce certain embodiments. In this example, an image manipulation system having one or more processing devices executes image manipulation modules to capture information from target images received by the image manipulation system. For example, the image manipulation system receives a target image and a text query. The target image may be any image that includes one or more distinguishable objects. In an example, the text query is an indication of an object that a user would like segmented from the target image. The text query can be an individual word, such as “chair,” or the text query can be a multi-word phrase, such as “dog in a chair.”

Continuing with this example, a learned image model of the image manipulation system uses a trainable component, such as a convolutional neural network (CNN), to extract features from the target image. The learned image model generates, with the extracted features, a learned image representation of the target image in a feature embedding space for images. Similarly, a text embedding model of the image manipulation system extracts features from the text query to generate a text embedding of the text query that is also in the feature embedding space for images. In an example, the text embedding model is a language-neutral embedding model that embeds similar words or phrases near one another in embedding space even if the words or phrases are in different languages. For instance, the language-neutral embedding model receives text queries that include similar objects or phrases in different languages, and generates similar text embeddings in the common embedding space.

The text embedding and the learned image representation being in a common embedding space allows the image manipulation system to generate a class activation map by convolving the text embedding with the learned image representation. A segmentation refinement model of the image manipulation system performs a refinement operation on the class activation map to generate a higher resolution mask of an object associated with the text embedding in the target image. The higher resolution mask indicates that certain objects from the target image are not relevant to the text query, or otherwise highlights the objects of the target image that are relevant to the text query. The image manipulation system uses the higher resolution mask of the object to determine object classifications and, in some cases, locations of various objects in the target image, and thereby generate an object-segmented image of the target image and the text query.

As described herein, certain embodiments provide improvements in image processing by generating object-segmented images using deep learning techniques in a segmentation operation. For instance, the segmentation operation utilizes image features in a learned image representation of a target image and text embeddings of a text query to identify and isolate objects depicted in the target image that are associated with the text query. The text embeddings are language-neutral and represent text of the text query. Because the segmentation operation performs the segmentation based on a convolution of the learned image representation and the text embeddings, the segmentation operation avoids issues associated with a limited set of classes associated available for segmentation and performing an extra saliency step to identify an object for segmentation. For example, a convolution of the text embedding and a learned image representation results in a class activation map that highlights a user-specified class or object from the text query. A mask generated from the resulting class activation map masks portions of the target image not relevant to the text query. These deep learning techniques used in the segmentation operation increase segmentation scope and, thus, improve segmentation accuracy and availability to avoid or even eliminate some challenges associated with other segmentation techniques.

Example Operating Environment for Segmentation Operations using Deep Learning Techniques

Referring now to the drawings, FIG. 1 depicts an example of a computing environment 100 for performing segmentation operations with deep learning techniques to manipulate a target image 102. The computing environment 100 includes an image manipulation application 104. The image manipulation application 104 executes on one or more computing devices. In some examples, a computing network (e.g., a cloud computing network, software-as-a-service implementation) implements the image manipulation application 104. That is, the image manipulation application 104 may be hosted in the cloud or on a remote server and be accessible by other computing devices. The image manipulation application 104 includes a learned image model 106, a text embedding model 108, a convolution engine 110, and a segmentation refinement model 112.

In one example, the image manipulation application 104 receives the target image 102 from a user. In another example, the image manipulation application 104 selects the target image 102 from a bank of images stored in a memory associated with the computing environment 100. The image manipulation application 104 applies the learned image model 106, which is a content embedding CNN model such as a ResNet encoder, to the target image 102. Based on the content of the target image 102, the learned image model 106 generates a learned image representation of the target image 102. The learned image representation generated by the learned image model 106 is a multi-dimensional feature space representation of what is included in the image. For example, the feature space representation includes a number of components arranged in a three-dimensional shape, where every component is a representation of a feature at a specific location in the target image 102. In an example, a target image 102 including a dog may have a similar feature space representation at each component location in the multi-dimensional feature space that includes a dog.

The image manipulation application 104 applies the text embedding model 108 to a text query 114. The text query 114 can be a word or a phrase relating to the target image 102. For example, the text query 114 may be “dog” or “dog in a boat.” In an example, the text embedding model 108 is a cross-lingual, multi-modal model. That is, the text embedding model 108 generates a text embedding representation of the text query 114 in a visual feature space. The visual feature space of the text embedding representation of the text query 114 is the same feature space as the feature space representation of the target image 102. For example, the text embedding representing the dog is similar to the feature space representations at each component location in the multi-dimensional feature space that includes a dog.

In an example, the text embedding model 108 is a cross-lingual, multi-modal model. That is, the image manipulation application 104 applies the text embedding model 108 to text queries 114 in multiple languages. Further, the text embedding representation generated by the text embedding model 102 is language neutral. In other words, a text query 114 of “perro,” which is Spanish for “dog,” will result in a similar text embedding representation as a text query 114 of “dog.” In some examples, the image manipulation application 104 applies multi-lingual sentence encoders to the text queries 114 to generate an encoded representation of a sentence. The image manipulation application 104 uses the encoded representation of the sentence to generate the text embedding representation of the sentence in the visual feature space. The encoded representation generated by the multi-lingual sentence encoder is in an encoded representation space that is common for all languages supported by the multi-lingual sentence encoder.

The image manipulation application 104 applies the text embedding representation of the text query 114 and the learned image representation of the target image 102 to a convolution engine 110. The convolution engine 110 includes an additional convolution layer. For example, the convolution engine 110 performs a convolution on the multi-dimensional learned image representation of the target image 102 and the text embedding representation of the text query 114. A result of the convolution is a spatially aware attention to the object of the text query 114. For example, the convolution engine 110 generates a class activation map representation of the target image 102 that highlights a location of the object of the text query 114. The class activation map is a back-projection of what CNN, such as the learned image model 106, pays attention to when the CNN makes a prediction.

In an example where the class activation maps produce weak signals, such as when the learned image model 106 and the convolution engine 110 produce low resolution class activation maps, the image manipulation application 104 applies the segmentation refinement model 112 to the class activation maps. The segmentation refinement model 112 refines the class activation maps to a higher resolution mask, such as a fine-attention mask, to obtain finer segmentation details of the target image 102. In an example, the segmentation refinement model 112 may be a mask refinement network. In the example, the mask refinement network takes class activation maps at two different resolutions of the target image 102 (e.g., at one and two times the original size of the target image 102) along with the target image 102 as an input and outputs the fine-attention mask. The image manipulation application 104 applies the fine-attention mask to the target image 102 to generate an object-segmented image 116. In an example, the mask refinement network is trained to predict fine-attention masks for classes present in a training dataset, such as the classes of the COCO 80 dataset. Other datasets with additional classes can also be used to train the mask refinement network.

Examples of Computer-Implemented Operations for Segmentation Operations

FIG. 2 depicts an example of the image-segmentation operation of FIG. 1. The image manipulation application 104 receives the target image 102 and the text query 114 and generates the object-segmented image 116. As illustrated, the target image 102 in this example is an image of a woman in a field of sunflowers. Further, the text query 114 is the term “sunflower.” Accordingly, the object-segmented image 116 generated by the image manipulation application 104 should segment or otherwise highlight the sunflowers from the target image 102 from other objects in the target image 102.

In an example, the image manipulation application 104 applies an image encoder 202, such as a ResNet encoder, to the target image 102. The image encoder 202 is a trainable CNN used to generate a learned image representation 204 of the target image 102. In an example, the image encoder 202 is an example of the learned image model 106 described above with respect to FIG. 1. Models other than the ResNet encoder may also be used as the image encoder 202 to generate the learned image representation 204 of the target image 102.

As illustrated, the learned image representation 204 is a three-dimensional feature space representation of the target image 102. The learned image representation 204 includes a number of components 206 arranged in a three-dimensional shape, where each component 206 is a representation of a feature of the target image 102 at a specific location within the target image 102. For example, some of the components 206 represent a location of the sunflowers within the target image 102, while other components 206 represent a location of the woman within the target image 102.

The text query 114 is a request for segmentation of the target image 102. As illustrated, the text query 114 requests segmentation of the term “sunflower.” A cross-lingual, multi-modal text encoder 208 generates a text embedding 210 of the text query 114. The text embedding 210 is a representation of the text query 114 in the same visual feature space as the learned image representation 204 of the target image 102. For example, the text embedding 210 includes a format similar to the individual components 206 of the learned image representation 204.

The text encoder 208 is an example of the text embedding model 108 described above with respect to FIG. 1. In an example, the text encoder 208 is a simple, deep learning architecture that is trained on pairs of text and images. A dataset used for training the text encoder 208 can be an image and a corresponding caption of the image. During training, the deep learning architecture on the text side initially converts the text from the dataset into a cross-lingual embedding using a multi-lingual universal sentence encoder. After converting the text to the cross-lingual embedding, fully connected layers of the deep learning architecture use the cross-lingual embedding to generate a text embedding in an image space. In an example, the deep learning architecture applies a metric learning loss function (e.g., a triplet loss function, a linear loss function, a contrastive loss function, a lossless triplet loss function, and the like) to the resulting text embedding. The metric learning loss function optimizes the text embeddings to achieve a result that is similar to an embedding of the training image. For example, a larger loss magnitude of the text embedding indicates that the text embedding is not accurate, while a smaller loss magnitude of the text embedding indicates that the text embedding is more accurate. Further, the resulting trained deep learning architecture generates language-neutral text embeddings 210. For example, the term “girasol,” which is sunflower in Spanish, generates the same or a similar text embedding 210 as the term “sunflower.”

The image manipulation application 104 performs a convolution 212 on the learned image representation 204 and the text embedding 210 to generate a class activation map 214 of the target image 102. The convolution 212, such as the convolution engine 110 of FIG. 1, may be a 1×1 convolution. The class activation map 214 is a back-projection of what a CNN, such as the image encoder 202, pays attention to when the CNN makes a prediction. As illustrated, the class activation map 214 highlights locations in the target image 102 that the image encoder 202 pays attention to when the text query 114 is the term “sunflower.”

The image manipulation application 104 applies the segmentation refinement model 112 to the class activation map 214 and the target image 102 to generate the object-segmented image 116. Because the class activation map 214 is typically low resolution, the segmentation refinement model 112 is able to refine the class activation map 214 to a higher resolution to obtain finer segmentation details of the target image 102. The image manipulation application 104 may use the higher resolution class activation map as a mask to generate the object-segmented image 116. As illustrated, the object-segmented image 116 displays the sunflowers from the target image 102.

FIG. 3 depicts an example of a process 300 for generating the object-segmented image 116 from the target image 102 using the image-segmentation operation discussed above with respect to FIGS. 1 and 2. In some embodiments, one or more operations described herein with respect to blocks 302-308 are used to implement a step for a step for segmenting a target image 102 with a class activation map 214 generated from a text embedding 210 of a text query 114 and a learned image representation 204 of the target image 102. One or more computing devices in the computing environment 100 implement operations depicted in the process 300 by executing suitable program code (e.g., the image manipulation application 104). For illustrative purposes, the process 300 is described with reference to certain examples depicted in the figures. Other implementations, however, are possible.

At block 302, the process 300 involves generating the learned image representation 204 of the target image 102. For instance, the image manipulation application 104 can receive or otherwise access the target image 102, and the learned image model 106 can generate the feature space representation of the target image 102. In an example, the learned image model includes a CNN used to generate a feature vector that forms the learned image representation 204 of the target image 102. The feature vector include the components 206 of the learned image representation 204 that identify objects within the target image 102.

At block 304, the process 300 involves the text embedding 210 of the text query 114. For instance, the text embedding model 108, such as the text encoder 208, generates the text embedding 114 that represents the text query 114 in a same visual embedding space as the learned image representation 204. That is, the text embedding 210 is in a similar format as the components 206 of the learned image representation 204.

At block 306, the process 300 involves generating the class activation map 214 of the target image 102 from the learned image representation 204 and the text embedding 210. For instance, the convolution 212 of learned image representation 204 and the text embedding 210 generates the class activation map 214. The class activation map 214 represents focus areas of the target image 102 that are relevant to the text query 114. For example, the class activation map 214 may be a heat map indicating relevance of portions of the target image 102 to the text query 114.

At block 308, the process 300 involves generating the object-segmented image 116 using the class activation map 214. For instance, the class activation map 214 and the target image 102 are be applied to a segmentation refinement model 112 to generate a higher resolution version of the class activation map 214. The higher resolution version of the class activation map 214, such as a fine-attention mask, segments the portions of the target image 102 that are relevant to the text query 114 from the portions of the target image 102 that are not relevant to the text query 114. In an example, the resulting object-segmented image 116 masks the portions of the target image 102 that are not relevant to the text query 114.

In this manner, the process 300 is able to localize portions of the target image 102 that are related to the text query 114. In an additional example, the one or more computing devices may perform the process 300 in reverse. For example, a user identifies a component in the target image 102, such as the sunflowers, using a selection operation, such as a mouse click. The process 300 is then used in reverse to identify what object was selected in the target image 102. For example, the reverse operation outputs the term “sunflower” based on the user selection of sunflowers in the target image 102.

FIG. 4 depicts an example of a class activation mapping system 400 of the image-segmentation operation described above with respect to FIGS. 1-3. The class activation map 214 highlights areas of the target image 102 that have contributed to a prediction of a CNN 402, such as the learned image model 106. In an example, the class activation maps 214 verify how well a neural network learns to understand classes in an intuitive way to humans.

The class activation mapping system 400 generates the class activation maps 214 as a function of a convolutional learning process. Shared filter banks 403 in final layers of a CNN 402 learn to activate on high level concepts on which the CNN 402 is trained. For example, an image classifier can be trained to activate on classes such as dog, cat, or bird or more fine-grained classes such as Australian terrier, Eiffel Tower, etc. Different filters in the filter banks 403 learn to activate on different high-level concepts that when combined generate a common representation that is unique to a particular class.

An average pooling process aggregates the activations of the filter banks 403 into an average pooled embedding 404, which is subsequently used for prediction of the object class to generate a prediction result 406. In this manner, an image with a dog, such as the target image 102 of FIG. 4, results in the filters with an enhanced response for dogs to activate in the region of the image that has a dog. Even in an example where portions of the target image 102 surrounding the dog include other features, the response to dog is strong enough to make an accurate classification. But the CNN 402 may struggle with multi-class images, such as those including a dog and a cat, due to the average pooling process. For example, the average pooling process results in dilution of both the dog and cat activations in the average pooled embedding 404, which limits the accuracy of the prediction result 406.

The class activation mapping system 400 calculates the class activation map 214 by convolving each location of a color by width by height tensor of the target image 102, such as the learned image representation 204, using the average pooled embedding 404. But the system 400 highlights individual objects or classes by obtaining the representation of the objects or classes generated by another image. This operation highlights the same objects or classes in the class activation map 214 and the other image. As discussed above, the text embedding model 108, such as the text encoder 208, generates the text embedding 210 of the text query 114 in the same feature space as the learned image representation 204. That is, the text embedding 210 of the text encoder 208 is in the same embedding space as the learned image representation 204 generated by the image encoder 202. The text embedding 210 of the text query 114 “dog” can be an embedding that is very close to a representation of “dog” generated in the learned image representation 204. Thus, convolving the text embedding 210 with the learned image representation 204 highlights all locations on in the learned image representation 204 that have a similar feature to the text embedding 210. In this manner, the class activation map 214 weakly localizes locations of the text query 114. Further refinement of the class activation map 214 using the segmentation refinement model 112 results in the object-segmented image 116.

To help illustrate the image-segmentation operation described above, FIG. 5 depicts examples of target images 102 a, 102 b, and 102 c and resulting object-segmented images 116 a, 116 b, and 116 c. The image manipulation application 104 generates the object-segmented image 116 a upon receipt of the target image 102 a and the text query 114 a of “woman.” The object-segmented image 116 a displays the portions of the target image 102 a identified by the image manipulation application 104 as being most closely associated with the term “woman.” Similarly, the image manipulation application 104 generates the object-segmented image 116 b upon receipt of the target image 102 b and the text query 114 b of “sky.” The object-segmented image 116 b displays the portions of the target image 102 a identified by the image manipulation application 104 as being most closely associated with the term “sky.” Further, the image manipulation application 104 generates the object-segmented image 116 c upon receipt of the target image 102 c and the text query 114 c of “sunflower.” The object-segmented image 116 b displays the portions of the target image 102 a identified by the image manipulation application 104 as being most closely associated with the term “sunflower.”

In some examples, rather than masking out the portions of the target image 102 unrelated to the text query 114, the object-segmented image 116 highlights the regions of the target image 102 that are related to the text query 114. For example, the object-segmented images 116 leave the related portions in color while gray scaling the unrelated portions of the target image 102. Other techniques for highlighting the object-segmented images 116 may also be used.

FIG. 6 depicts examples of target images 602 a, 602 b, and 602 c and resulting object-segmented images 616 a, 616 b, and 616 c using a language-neutral image-segmentation operation. As discussed above, the text embedding model 108 is a multi-lingual embedding model. That is, the text embedding model 108 is able to generate the text embedding 210 for a text query 614 presented in a number of different languages. Further, the text embedding 210 represents the text query 614 in a language-neutral format. In other words, the text embedding 210 is the same or similar for text queries 614 of the same word or phrase provided in different languages.

The image manipulation application 104 generates the object-segmented image 616 a upon receipt of the target image 602 a and a text query 614 a of “elephant” in English. The object-segmented image 616 a displays the portions of the target image 602 a identified by the image manipulation application 104 as being most closely associated with the English term “elephant.” Similarly, the image manipulation application 104 generates the object-segmented image 616 b upon receipt of the target image 602 b and the text query 614 b of “C

OH,” which is elephant in Russian. The object-segmented image 616 b displays the portions of the target image 602 a identified by the image manipulation application 104 as being most closely associated with the term “C

OH.” As shown, the object-segmented image 616 b is very similar to the object-segmented image 616 a. Further, the image manipulation application 104 generates the object-segmented image 616 c upon receipt of the target image 602 c and the text query 614 c of “

” which is the Chinese character for elephant. The object-segmented image 616 b displays the portions of the target image 602 a identified by the image manipulation application 104 as being most closely associated with the symbol “

” As shown, the object-segmented image 616 c is very similar to the object-segmented images 616 a and 616 b due to the language-neutral text embeddings 210 of the text queries 614 a, 614 b, and 614 c.

Computing System Example for Generating an Object-Segmented Image

Any suitable computing system or group of computing systems can be used for performing the operations described herein. For example, FIG. 7 depicts an example of a computing system 700 that can implement the computing environment of FIG. 1. In some embodiments, the computing system 700 includes a processor 702 that executes the image manipulation application 104, a memory 704 that stores various data computed or used by the image manipulation application 104, an input device 714 (e.g., a mouse, a stylus, a touchpad, a touchscreen, etc.), and a display device 712 that displays graphical content generated by the image manipulation application 104. For illustrative purposes, FIG. 7 depicts a single computing system that executes the image manipulation application 104 and includes the input device 714 and display device 712 are present. But these applications, datasets, and devices can be stored or included across different computing systems having devices similar to the devices depicted in FIG. 7.

The depicted example of a computing system 700 includes a processor 702 communicatively coupled to one or more memory devices 704. The processor 702 executes computer-executable program code stored in a memory device 704, accesses information stored in the memory device 704, or both. Examples of the processor 702 include a microprocessor, an application-specific integrated circuit (“ASIC”), a field-programmable gate array (“FPGA”), or any other suitable processing device. The processor 702 can include any number of processing devices, including a single processing device. In an example, the computing system 700 includes a GPU 703. In another example, the processor 702 can be configured to perform the functions of the GPU 703 described herein (e.g., by causing the processor 702 to execute specialize graphics processing software).

The memory device 704 includes any suitable non-transitory computer-readable medium for storing data, program code, or both. A computer-readable medium can include any electronic, optical, magnetic, or other storage device capable of providing a processor with computer-readable instructions or other program code. Non-limiting examples of a computer-readable medium include a magnetic disk, a memory chip, a ROM, a RAM, an ASIC, optical storage, magnetic tape or other magnetic storage, or any other medium from which a processing device can read instructions. The instructions may include processor-specific instructions generated by a compiler or an interpreter from code written in any suitable computer-programming language, including, for example, C, C++, C#, Visual Basic, Java, Python, Perl, JavaScript, and ActionScript.

The computing system 700 may also include a number of external or internal devices, such as an input device 714, a display device 712, or other input or output devices. For example, the computing system 700 is shown with one or more input/output (“I/O”) interfaces 708. An I/O interface 708 can receive input from input devices or provide output-to-output devices. One or more buses 706 are also included in the computing system 700. The buses 706 communicatively couple one or more components of a respective one of the computing system 700.

The computing system 700 executes program code that configures the processor 702 to perform one or more of the operations described herein. The program code includes, for example, the image manipulation application 104 or other suitable applications that perform one or more operations described herein. The program code may be resident in the memory device 704 or any suitable computer-readable medium and may be executed by the processor 702 or any other suitable processor. In some embodiments, all modules in the image manipulation application 104 (e.g., the learned image model 106, the text embedding model 108, the convolution engine 110, the segmentation refinement model 112, etc.) are stored in the memory device 704, as depicted in FIG. 7. In additional or alternative embodiments, one or more of these modules from the image manipulation application 104 are stored in different memory devices of different computing systems.

In some embodiments, the computing system 700 also includes a network interface device 710. The network interface device 710 includes any device or group of devices suitable for establishing a wired or wireless data connection to one or more data networks. Non-limiting examples of the network interface device 710 include an Ethernet network adapter, a modem, and/or the like. The computing system 700 is able to communicate with one or more other computing devices (e.g., a computing device that receives inputs for image manipulation application 104 or displays outputs of the image manipulation application 104) via a data network using the network interface device 710.

An input device 714 can include any device or group of devices suitable for receiving visual, auditory, or other suitable input that controls or affects the operations of the processor 702. Non-limiting examples of the input device 714 include a touchscreen, stylus, a mouse, a keyboard, a microphone, a separate mobile computing device, etc. A display device 712 can include any device or group of devices suitable for providing visual, auditory, or other suitable sensory output. Non-limiting examples of the display device 712 include a touchscreen, a monitor, a separate mobile computing device, etc.

Although FIG. 7 depicts the input device 714 and the display device 712 as being local to the computing device that executes the image manipulation application 104, other implementations are possible. For instance, in some embodiments, one or more of the input device 714 and the display device 712 can include a remote client-computing device that communicates with the computing system 700 via the network interface device 710 using one or more data networks described herein.

General Considerations

Numerous specific details are set forth herein to provide a thorough understanding of the claimed subject matter. However, those skilled in the art will understand that the claimed subject matter may be practiced without these specific details. In other instances, methods, apparatuses, or systems that would be known by one of ordinary skill have not been described in detail so as not to obscure claimed subject matter.

Unless specifically stated otherwise, it is appreciated that throughout this specification discussions utilizing terms such as “processing,” “computing,” “calculating,” “determining,” and “identifying” or the like refer to actions or processes of a computing device, such as one or more computers or a similar electronic computing device or devices, that manipulate or transform data represented as physical electronic or magnetic quantities within memories, registers, or other information storage devices, transmission devices, or display devices of the computing platform.

The system or systems discussed herein are not limited to any particular hardware architecture or configuration. A computing device can include any suitable arrangement of components that provide a result conditioned on one or more inputs. Suitable computing devices include multi-purpose microprocessor-based computer systems accessing stored software that programs or configures the computing system from a general-purpose computing apparatus to a specialized computing apparatus implementing one or more embodiments of the present subject matter. Any suitable programming, scripting, or other type of language or combinations of languages may be used to implement the teachings contained herein in software to be used in programming or configuring a computing device.

Embodiments of the methods disclosed herein may be performed in the operation of such computing devices. The order of the blocks presented in the examples above can be varied—for example, blocks can be re-ordered, combined, and/or broken into sub-blocks. Certain blocks or processes can be performed in parallel.

The use of “adapted to” or “configured to” herein is meant as open and inclusive language that does not foreclose devices adapted to or configured to perform additional tasks or steps. Additionally, the use of “based on” is meant to be open and inclusive, in that a process, step, calculation, or other action “based on” one or more recited conditions or values may, in practice, be based on additional conditions or values beyond those recited. Headings, lists, and numbering included herein are for ease of explanation only and are not meant to be limiting.

While the present subject matter has been described in detail with respect to specific embodiments thereof, it will be appreciated that those skilled in the art, upon attaining an understanding of the foregoing, may readily produce alterations to, variations of, and equivalents to such embodiments. Accordingly, it should be understood that the present disclosure has been presented for purposes of example rather than limitation, and does not preclude the inclusion of such modifications, variations, and/or additions to the present subject matter as would be readily apparent to one of ordinary skill in the art. 

1. A non-transitory computer-readable medium having program code that is stored thereon, the program code executable by one or more processing devices for performing operations comprising: generating, by a model that includes trainable components, a learned image representation of a target image; generating, by a text embedding model, a text embedding of a text query, wherein the text embedding and the learned image representation of the target image are in a same embedding space; generating a class activation map of the target image by, at least, convolving the learned image representation of the target image with the text embedding of the text query; and generating an object-segmented image using the class activation map of the target image.
 2. The non-transitory computer-readable medium of claim 1, wherein generating the object-segmented image comprises: generating a fine-attention mask by applying a mask refinement network to (i) the class activation map of the target image and (ii) the target image; and segmenting the target image into the object-segmented image by, at least, applying the fine-attention mask to the target image.
 3. The non-transitory computer-readable medium of claim 1, wherein generating, by the model that includes the trainable components, the learned image representation of the target image comprises applying a convolutional neural network to the target image to generate the learned image representation of the target image.
 4. The non-transitory computer-readable medium of claim 1, wherein generating the learned image representation of the target image comprises generating the learned image representation of the target image in a three-dimensional feature space.
 5. The non-transitory computer-readable medium of claim 1, wherein generating the text embedding of the text query comprises applying a cross-lingual, multi-modal model to the text query.
 6. The non-transitory computer-readable medium of claim 1, wherein generating the text embedding of the text query comprises applying the text embedding model to a multi-word phrase to generate the text embedding of the multi-word phrase in the embedding space.
 7. The non-transitory computer-readable medium of claim 1, wherein generating the text embedding of the text query comprises: applying a universal sentence encoder to the text query to generate a cross-lingual representation of the text query; and applying the text embedding model to the cross-lingual representation of the text query to generate the text embedding in the embedding space.
 8. The non-transitory computer-readable medium of claim 1, wherein generating the object-segmented image using the class activation map of the target image comprises highlighting at least one component of the target image that is relevant to the text query.
 9. A method comprising: receiving a target image; a step for segmenting the target image with a class activation map generated from a text embedding of a text query and a learned image representation of the target image; and outputting an object-segmented image generated by the step for segmenting the target image.
 10. The method of claim 9, wherein the step for segmenting the target image with the class activation map generated from a text embedding of a text query and a learned image representation of the target image comprises: generating a fine-attention mask by applying a mask refinement network to (i) the class activation map of the target image and (ii) the target image; and segmenting the target image into the object-segmented image by, at least, applying the fine-attention mask to the target image.
 11. The method of claim 9, further comprising: applying a convolutional neural network to the target image to generate the learned image representation of the target image.
 12. The method of claim 11, wherein the learned image representation of the target image comprises a three-dimensional feature space.
 13. The method of claim 9, further comprising: applying a cross-lingual, multi-modal model to the text query to generate the text embedding.
 14. The method of claim 9, further comprising: applying a text embedding model to a multi-word phrase of the text query to generate the text embedding of the multi-word phrase, wherein the text embedding and the learned image representation of the target image are in a same embedding space.
 15. The method of claim 9, further comprising: applying a universal sentence encoder to the text query to generate a cross-lingual representation of the text query; and applying a text embedding model to the cross-lingual representation of the text query to generate the text embedding.
 16. A system comprising: a processing device; and a non-transitory computer-readable medium communicatively coupled to the processing device, wherein the processing device is configured to execute program code stored in the non-transitory computer-readable medium and thereby perform operations comprising: accessing a learned image representation of a target image and a text embedding of a text query, wherein the text embedding and the learned image representation of the target image are in a same embedding space; generating a class activation map from the learned image representation of the target image and the text embedding of the text query, and generating an object-segmented image using the class activation map of the target image.
 17. The system of claim 16, wherein the operation of generating the object-segmented image further comprises: generating a fine-attention mask by applying a mask refinement network to (i) the class activation map of the target image and (ii) the target image; and segmenting the target image into the object-segmented image by, at least, applying the fine-attention mask to the target image.
 18. The system of claim 16, the operations further comprising: generating, by a convolutional neural network, the learned image representation of the target image comprises.
 19. The system of claim 16, the operations further comprising: generating the learned image representation of the target image in a three-dimensional feature space.
 20. The system of claim 16, wherein generating the object-segmented image using the class activation map of the target image comprises highlighting at least one component of the target image that is relevant to the text query. 